import React from "react";
import { NavBar as AntdNavBar } from "antd-mobile";
import "./NavBar.scss";

interface NavBarProps {
   back?: React.ReactNode | string;
   right?: React.ReactNode | string;
   backIcon?: React.ReactNode | boolean;
   children?: React.ReactNode | string;
   onBack?: () => void;
}

const NavBar: React.FunctionComponent<NavBarProps> = ({ right, back, children, onBack, backIcon = false }) => {
   return (
      <div className="nav-bar">
         <AntdNavBar back={back} right={right} children={children} onBack={onBack} backIcon={backIcon}></AntdNavBar>
      </div>
   );
};

export default NavBar;
